#include<stdio.h>
#include<sys/types.h>
#include<unistd.h>

int main()
{
  pid_t id = fork();
  if(id == 0)
  {
    int cnt = 5;
     while(cnt--)
     {
        printf("i am child program!,pid = %d\n",getpid());
        sleep(1);
     }
  }
  else
  {
     while(1)
     {
       printf("i am parent program!,pid = %d\n",getpid());
       sleep(1);
     }
  }
  return 0;
}
